package com.hgw.Demo09_StrategyPattern.StrategyPattern;

/**
 * Data time:2021/12/20 20:13
 * StudentID:2019112118
 * Author:hgw
 * Description: 客户端测试类
 */
public class Client {
    public static void main(String[] args) {
        Context context = new Context();
        AbstractStrategy strategy;
        strategy = new ConcreteStrategyA();     // 可在运行时指定类型，通过配置文件和反射机制实现
        context.setStrategy(strategy);
        context.algorithm();
    }
}
